<?php
define('NAME_FOLDER','myjoco');

//You need to specify the path to CORE FOLDER CORRECTLY
define('CORE_FOLDER',dirname(__FILE__));

//define('BJOCO_FOLDER',dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'www'.DIRECTORY_SEPARATOR.NAME_FOLDER);
//define('OPTIONS_FOLDER',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'myjoco'.DIRECTORY_SEPARATOR.'options');
//define('FRONT_END',dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'www'.DIRECTORY_SEPARATOR.NAME_FOLDER.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'protected');
//define('BACK_END',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'backend'.DIRECTORY_SEPARATOR.'protected');

/**
*	config path root 
*
**/

define('ROOT', dirname(dirname(__FILE__))); //ROOT la thu muc goc myjoco
define('OPTIONS_FOLDER',ROOT.DIRECTORY_SEPARATOR.'options');
define('FRONTEND', ROOT.DIRECTORY_SEPARATOR.'frontend');
define('FRONTEND_PROTECTED', FRONTEND.DIRECTORY_SEPARATOR.'protected');
define('BACKEND', ROOT.DIRECTORY_SEPARATOR.'backend');
define('BACKEND_PROTECTED', BACKEND.DIRECTORY_SEPARATOR.'protected');
// define('OPTIONS_FOLDER',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'options');
define('EVENT_FOLDER',dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'myjoco');
// define('BACK_END',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'backend'.DIRECTORY_SEPARATOR.'protected');
define('BACK_STORE',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'backend');
// define('CONFIG_FOLDER',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'protected'.DIRECTORY_SEPARATOR.'config');
// define('FRONT_END',dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'protected');
define('WIDGETS',EVENT_FOLDER.DIRECTORY_SEPARATOR.'widgets');
$yii=ROOT.DIRECTORY_SEPARATOR.'framework'.DIRECTORY_SEPARATOR.'yii.php';
$define= ROOT.DIRECTORY_SEPARATOR.'options'.DIRECTORY_SEPARATOR.'define.php';
$globals= ROOT.DIRECTORY_SEPARATOR.'options'.DIRECTORY_SEPARATOR.'globals.php';

require_once($define);
require_once($globals);
$config_backend=BACKEND_PROTECTED.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'main.php';
//require_once($config);
require_once($yii);

Yii::createWebApplication($config_backend)->run();